package hfu.pm.entities;

import java.util.Date;

import javax.persistence.*;

import com.googlecode.objectify.Key;

public class Subscription {
	@Id
	Long id;
	
	Key<Room> room;
	Key<Account> account;
	
	Date timestamp;

	public Subscription() {
		timestamp = new Date(System.currentTimeMillis());
	}

	public Long getId() {
		return id;
	}

	public Key<Room> getRoom() {
		return room;
	}

	public void setRoom(Key<Room> room) {
		this.room = room;
	}

	public Key<Account> getAccount() {
		return account;
	}

	public void setAccount(Key<Account> account) {
		this.account = account;
	}

	public Date getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(Date timestamp) {
		this.timestamp = timestamp;
	}

	public void setTimestamp() {
		this.timestamp = new Date(System.currentTimeMillis());
	}
}
